<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        class person{
            private $name;
            private $id;
            public function __construct($id,$name) {
                $this->name=$name;
                $this->id=$id;
            }

            public function set_name($name){
                $this->name=$name;
            }
            public function get_name(){
                echo "name is :".$this->name.'<br/>';
            }
            public function get_id(){
                echo 'id is:'.$this->id.'<br/>';
            }
        }
        $boy=new person;
        $boy->set_name('harry');
        $boy->get_name();
        $girl=new person;
        $girl->set_name('emma');
        $girl->get_name();
        $a=new person(1, 'jiang');
        $a->get_id();
        $a->get_name();
		echo'hello git';
		$boys=new person(1111, 'jkjkjkj');
		echo $boys->get_id().$boys->get_name();
		
        ?>
    </body>
</html>
